package com.jianganming.mediator.demo;

//房主
public class HouseOwner extends Person {
    public HouseOwner(String name,MediatorCompany mediatorCompany){
        super(name,mediatorCompany);
    }

    //联络方法
    public void connection(String message){
        //通过中介者发布消息
        mediatorCompany.connection(this,message);
    }
    //获取消息
    public void getMessage(String message){
        System.out.println("房主"+name+"获取到到消息:"+message);
    }
}
